import { Card, Button, Form, Input } from 'antd';
import { PlusCircleOutlined, UserOutlined } from '@ant-design/icons'
import './card.scss'
function App({ btnLabel, getParamsVal ,addClick}) {
    const onFinish = (v) => {
        getParamsVal(v)
    }
   
    return (
        <Card size="small" className='table-card'>
            <Form name="horizontal_login" layout="inline" onFinish={onFinish}>
                <Form.Item name="name">
                    <Input allowClear prefix={<UserOutlined className="site-form-item-icon" />} placeholder={`请输入${btnLabel}名`} />
                </Form.Item>
                <Form.Item>
                    <Button type="primary" htmlType='submit'>查询</Button>
                </Form.Item>
            </Form>
            <Button icon={<PlusCircleOutlined />}  onClick={addClick}>{`新增${btnLabel}`}</Button>
        </Card>
    )
}
export default App;